#!/bin/sh
#
#  Test if daemons start
#

exit 0
TestName="pretest"
JobName=backup
error=0

. scripts/functions

copy_test_confs


cat <<END_OF_DATA >${cwd}/tmp/bconcmds
messages
quit
END_OF_DATA

start_test

run_susan
if [ $? -ne 0 ]; then
   echo "Error: Starting Susan Failed in pretest"
   make distclean
   make setup
   exit 1
fi

bin/susan-ctl-dir status >/dev/null
if [ $? -ne 0 ]; then
   echo "Error: susan-dir failed to start"
   make distclean
   make setup
   exit 1
fi

bin/susan-ctl-fd status >/dev/null
if [ $? -ne 0 ]; then
   echo "Error: susan-fd failed to start"
   make distclean
   make setup
   exit 1
fi

bin/susan-ctl-sd status >/dev/null
if [ $? -ne 0 ]; then
   echo "Error: susan-sd failed to start"
   make distclean
   make setup
   exit 1
fi

stop_susan

dstat=0
bstat=$error
rstat=0
export dstat
export bstat
export rstat

end_test

exit $error
